Method and apparatus for encoding image, and method and apparatus for decoding image

ABSTRACT

The present invention discloses a method and an apparatus for encoding and decoding video. A video decoding method comprises reconstructing a residual value by entropy-decoding received bitstream and dequantizing and inverse-transforming residual value information, generating a final prediction unit by performing inter prediction on a prediction unit which is partitioned from a coding unit into at least two prediction units by asymmetric motion partitioning (AMP), the two partitioned prediction units comprising a first partitioned prediction unit and a second partitioned prediction unit, and reconstructing a picture by adding the final prediction unit to the residual values.

CROSS REFERENCE TO RELATED APPLICATIONS

This application is a Continuation of U.S. patent application Ser. No.15/592,478 (filed on Oct. 13, 2016), which is a Continuation of U.S.patent application Ser. No. 15/218,403 (filed on Jul. 25, 2016), nowissued as U.S. Pat. No. 9,497,477, which is a Continuation of U.S.patent application Ser. No. 14/357,056 (filed on May 8, 2014), nowissued as U.S. Pat. No. 9,432,683, which is a National Stage PatentApplication of PCT International Patent Application No.PCT/KR2012/009180 (filed on Nov. 2, 2012) under 35 U.S.C. §371, whichclaims priority to Korean Patent Application Nos. 10-2011-0116130 (filedon Nov. 8, 2011) and 10-2012-0123519 (filed on Nov. 2, 2012), theteachings of which are incorporated herein in their entireties byreference.

BACKGROUND

The present invention relates to image processing, and moreparticularly, to an inter prediction method and an inter predictionapparatus.

Recently, demands for high-resolution and high-quality videos, such ashigh-definition (HD) and ultrahigh-definition (UHD) videos, areincreasing.

To provide videos with higher resolution and higher quality, the amountof video data increases. Accordingly, costs of transferring and storingvideo data rise so as to provide high-quality videos as compared withconventional video data processing methods. In order to solve theseproblems occurring with an increase in resolution and quality of videodata, high-efficiency video compression techniques may be utilized.

As video data compression technology, various schemes are used such asinter prediction of predicting pixel values included in a currentpicture from other pictures, intra prediction of predicting pixel valuesincluded in a current picture using information on other pixels than thecurrent picture, and entropy encoding/decoding of allocating shortercodes to frequently occurring or appearing signals.

SUMMARY

An aspect of the present invention is to provide a video encoding methodand a video encoding apparatus which are capable of increasing videoencoding performance.

Another aspect of the present invention is to provide a video decodingmethod and a video decoding apparatus which are capable of increasingvideo decoding performance.

Still another aspect of the present invention is to provide an interencoding method and an inter encoding apparatus which are capable ofincreasing video encoding performance.

An embodiment of the present invention provides a video decoding methodincluding reconstructing a residual value by entropy-decoding a receivedbitstream and dequantizing and inverse-transforming residual valueinformation, generating a final prediction unit by performing interprediction on a prediction unit which is partitioned form a coding unitinto at least two prediction units by asymmetric motion partitioning(AMP), the two partitioned prediction units including a firstpartitioned prediction unit and a second partitioned prediction unit,and reconstructing a picture by adding the final prediction unit to theresidual value, wherein the generating of the final prediction unitincludes performing interpolation using a filter tap with a variablelength based on a horizontal length or a vertical length of the firstpartitioned prediction unit so that pixels in the second partitionedprediction unit are not involved in interpolation.

The generating of the final prediction unit may include performinginterpolation for the first partitioned prediction unit and performinginterpolation for the second partitioned prediction unit using filtertaps with different lengths based on a horizontal length or a verticallength of the prediction unit.

The generating of the final prediction unit may include performinghorizontal interpolation for the first partitioned prediction unit usinga horizontal filter tap shorter than a vertical filter tap when thefirst partitioned prediction unit is asymmetric and short in ahorizontal direction.

The generating of the final prediction unit may include performingvertical interpolation for the first partitioned prediction unit using avertical filter tap shorter than a horizontal filter tap when the firstpartitioned prediction unit is asymmetric and short in a verticaldirection.

The generating of the final prediction unit may include performinghorizontal interpolation for the first partitioned prediction unit usinga horizontally short filter tap shorter than a filter tap for the secondpartitioned prediction unit which is horizontally long when the firstpartitioned prediction unit is asymmetric and short in a horizontaldirection.

The generating of the final prediction unit may include performingvertical interpolation for the first partitioned prediction unit using avertically short filter tap shorter than a filter tap for the secondpartitioned prediction unit which is vertically long when the firstpartitioned prediction unit is asymmetric and short in a verticaldirection.

A 4-tap filter may be used for the first partitioned prediction unit invertical interpolation and a 6-tap filter is used for the secondpartitioned prediction unit in vertical interpolation when a 64×64 unitto be predicted is asymmetrically partitioned in a vertical directioninto 2N×nU or 2N×nD prediction units, N being a natural number, a 2N×nUprediction unit being a partitioned form having an upper block with asmaller area, and a 2N×nD prediction unit being a partitioned formhaving a lower block with a smaller area, and a 4-tap filter may be usedfor the first partitioned prediction unit in horizontal interpolationand a 6-tap filter is used for the second partitioned prediction unit inhorizontal interpolation when the 64×64 unit to be predicted isasymmetrically partitioned in a horizontal direction into nL×2N or nR×2Nprediction units, N being a natural number, an nL×2N prediction unitbeing a partitioned form having a left block with a smaller area, and annR×2N prediction unit being a partitioned form having a right block witha smaller area.

A total length of filter taps in an asymmetric direction of the firstand the second partitioned prediction units may be larger than a lengthof a filter tap in a direction other than the asymmetric direction.

The received bitstream may include information on a prediction mode anda form of a prediction unit corresponding to the decoding target block.

The received bitstream may further include information on a length of aninterpolation filter tap of the prediction unit corresponding to thedecoding target block.

The generating of the final prediction unit may include acquiring, fromthe bitstream, partition information on which direction the partitionedprediction units are asymmetrical; determining, based on the partitioninformation, which asymmetric direction the partitioned prediction unitshave a longer length; determining a length of a filter tap to be usedfor interpolation based on a determination result; and performinginterpolation using the determined filter tap.

Another embodiment of the present invention provides a video decodingapparatus including a residual value reconstructing module toreconstruct a residual value by entropy-decoding a received bitstreamand dequantizing and inverse-transforming residual value information, afinal prediction unit generating module to generate a final predictionunit by performing inter prediction on a prediction unit which ispartitioned from a coding unit into at least two prediction units byAMP, the two partitioned prediction units including a first partitionedprediction unit and a second partitioned prediction unit; and a picturereconstructing module to reconstruct a picture by adding the finalprediction unit to the residual value, wherein the final prediction unitgenerating module performs interpolation using a filter tap with avariable length based on a horizontal length or a vertical length of thefirst partitioned prediction unit so that pixels in the secondpartitioned prediction unit are not involved in interpolation.

Still another embodiment of the present invention provides a videoencoding method including performing inter prediction on a predictionunit obtained by partitioning an input picture using AMP to predict andencode the picture, the partitioned prediction unit including a firstpartitioned prediction unit and a second partitioned prediction unit,and transforming and quantizing a residual value that is a differencebetween a prediction unit generated by the inter prediction and acurrent prediction unit, and entropy-encoding thereon, wherein theperforming of the inter prediction includes performing interpolationusing a filter tap with a variable length based on a horizontal lengthor a vertical length of the first partitioned prediction unit so thatpixels in the second partitioned prediction unit are not involved ininterpolation.

The performing of the inter prediction may include performinginterpolation for the first partitioned prediction unit and performinginterpolation for the second partitioned prediction unit using filtertaps with different lengths based on a horizontal length or a verticallength of the prediction units.

The performing of the inter prediction may include performing horizontalinterpolation for the first partitioned prediction unit using ahorizontal filter tap shorter than a vertical filter tap when the firstpartitioned prediction unit is asymmetric and short in a horizontaldirection.

The performing of the inter prediction may include performing horizontalinterpolation using a horizontally short filter tap shorter than afilter tap for the second partitioned prediction unit which ishorizontally long when the first partitioned prediction unit isasymmetric and short in a horizontal direction.

A total length of filter taps in an asymmetric direction of the firstand the second partitioned prediction units may be larger than a lengthof a filter tap in a direction other than the asymmetric direction.

The performing of the inter prediction may include acquiring informationon which direction the partitioned prediction units are asymmetrical;determining, based on the obtained information, which asymmetricdirection the partitioned prediction units have a longer length;determining a length of a filter tap to be used for interpolation basedon a determination result; and performing interpolation using thedetermined filter tap.

The transforming and quantizing a residual value, and entropy-encodingthereon comprises generating a bitstream, and wherein the bitstreamcomprises information on a length of an interpolation filter tap of theprediction unit corresponding to an encoding target block

Yet another embodiment of the present invention provides a videoencoding apparatus including an inter prediction module to perform interprediction on a prediction unit obtained by partitioning an inputpicture using AMP to predict and encode the picture, the partitionedprediction unit including a first partitioned prediction unit and asecond partitioned prediction unit, and an entropy encoding module toentropy-encode a residual value which is transformed and/or quantized,wherein the residual value is a difference between a prediction unitgenerated by the inter prediction and a current prediction unit, andwherein the inter prediction module performs interpolation using afilter tap with a variable length based on a horizontal length or avertical length of the first partitioned prediction unit so that pixelsin the second partitioned prediction unit are not involved ininterpolation.

According to a video encoding method and a video encoding apparatus ofthe present invention, video encoding performance may be enhanced.

According to a video decoding method and a video decoding apparatus ofthe present invention, video decoding performance may be enhanced.

According to an inter prediction encoding method and an inter predictionencoding apparatus of the present invention, video encoding/decodingperformance may be enhanced.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram illustrating a configuration of a videoencoding apparatus according to an exemplary embodiment of the presentinvention.

FIG. 2 is a block diagram illustrating a configuration of a videodecoding apparatus according to an exemplary embodiment of the presentinvention.

FIG. 3 schematically illustrates interpolation in inter predictionaccording to an exemplary embodiment of the present invention.

FIG. 4 schematically illustrates that an interpolation filter tap isused when asymmetric motion partitioning (AMP) is used in a verticaldirection in the video encoding apparatus according to an exemplaryembodiment of the present invention.

FIG. 5 schematically illustrates that an interpolation filter tap isused when AMP is used in a horizontal direction in the video encodingapparatus according to an exemplary embodiment of the present invention.

FIG. 6 is a flowchart schematically illustrating a process of performinginter prediction for an asymmetrically partitioned PU in the videoencoding apparatus according to an exemplary embodiment of the presentinvention.

FIG. 7 schematically illustrates that an interpolation filter tapadequate for a vertical or horizontal length of a partitioned PU is usedwhen AMP is used in the vertical direction in the video encodingapparatus according to an exemplary embodiment of the present invention.

FIG. 8 schematically illustrates that an interpolation filter tapadequate for a vertical or horizontal length of a partitioned PU is usedwhen AMP is used in the horizontal direction in the video encodingapparatus according to an exemplary embodiment of the present invention.

FIG. 9 is a flowchart schematically illustrating a video encoding methodaccording to an exemplary embodiment of the present invention.

FIG. 10 is a flowchart schematically illustrating a video decodingmethod according to an exemplary embodiment of the present invention.

DETAILED DESCRIPTION OF EMBODIMENTS

The present invention may be changed and modified variously and beillustrated with reference to different exemplary embodiments, some ofwhich will be described and shown in the drawings.

However, these embodiments are not intended for limiting the inventionbut are construed as including includes all modifications, equivalentsand replacements which belong to the spirit and technical scope of theinvention.

Although the terms first, second, etc. may be used to describe variouselements, these elements should not be limited by these terms. Theseterms are used only to distinguish one element from another element. Forexample, a first element could be termed a second element and a secondelement could be termed a first element likewise without departing fromthe teachings of the present invention. The term “and/or” includes anyand all combinations of a plurality of associated listed items.

It will be understood that when an element is referred to as being“connected to” or “coupled to” another element, the element can bedirectly connected or coupled to another element or interveningelements. On the contrary, when an element is referred to as being“directly connected to” or “directly coupled to” another element, thereare no intervening elements present.

The terminology used herein is for the purpose of describing particularembodiments only and is not intended to be limiting of the invention. Asused herein, the singular forms “a,” “an” and “the” are intended toinclude the plural forms as well, unless the context clearly indicatesotherwise. It will be further understood that the terms “include” and/or“have,” when used in this specification, specify the presence of statedfeatures, integers, steps, operations, elements, and/or components, butdo not preclude the presence or addition of one or more other features,integers, steps, operations, elements, components, and/or groupsthereof.

Unless otherwise defined, all terms (including technical and scientificterms) used herein have the same meaning as commonly understood by oneof ordinary skill in the art to which this invention belongs. It will befurther understood that terms, such as those defined in commonly useddictionaries, should be interpreted as having a meaning that isconsistent with their meaning in the context of the relevant art andwill not be interpreted in an idealized or overly formal sense unlessexpressly so defined herein.

Hereinafter, exemplary embodiments of the invention will be described indetail with reference to the accompanying drawings. For ease ofunderstanding, like reference numerals in the drawings refer to likeelements throughout, and redundant descriptions of like elements will beomitted herein.

FIG. 1 is a block diagram illustrating a configuration of a videoencoding apparatus according to an exemplary embodiment of the presentinvention. Referring to FIG. 1, the video encoding apparatus may includea picture partition module 110, an inter prediction module 120, an intraprediction module 125, a transform module 130, a quantization module135, a dequantization module 140, an inverse transform module 145, amodule filter 150, a memory 155, a rearrangement module 160 and anentropy encoding module 165.

The picture partition module 110 may divide an input picture into one ormore coding units. A coding unit (CU) is a unit of encoding performed bythe video encoding apparatus and may be recursively split with depthinformation based on a quadtree structure. A CU may have different sizesof 8×8, 16×16, 32×32 and 64×64. A CU with a maximum size is referred toas a largest coding unit (LCU), and a CU with a minimum size as asmallest coding unit (SCU).

The picture partition module 110 may divide a CU to generate aprediction unit (PU) and the picture partition module 110 may divide aCU to generate a transform unit (TU). A PU may be smaller than or thesame as a CU, and may not necessarily be a square block but be arectangular block.

Generally, intra prediction may be performed by 2N*2N or N*N blocks.Here, N is a natural number, representing a number of pixels, and 2N*2Nor N*N may represent a PU size (and/or partition mode). However, inshort distance intra prediction (SDIP), not only a 2N*2N PU but afurther subdivided PU with a size of hN*2N/2N*hN (here, h=½) may be alsoused to increase efficiency in intra prediction. When an hN*2N PU or2N*hN PU is used, directionality of a boundary in a block may bereflected well, and accordingly energy of a prediction error signal maybe decreased to reduce an amount of bits needed for encoding, therebyincreasing encoding efficiency.

Inter prediction may be performed by 2N*2N, 2N*N, N*2N or N*N blocks.Here, N is a natural number, representing a number of pixels, and 2N*2N,2N*N, N*2N or N*N may represent a PU size (and/or partition mode).Further, inter prediction may be performed in the unit of 2N×nU PU,2N×nD PU, nL×2N PU or nR×2N PU, in addition to the 2N*2N PU, 2N*N PU,N*2N PU or N*N PU, in order to enhance efficiency in inter prediction.Here, 2N×nU, 2N×nD, nL×2N or nR×2N may represent a PU size (and/orpartition mode). In 2N×nU and 2N×nD partition modes, a PU may have asize of 2N×(1/2)N or 2N×(3/2)N, while in nL×2N and nR×2N partitionmodes, a PU may have a size of (1/2)N×2N or (3/2)N×2N.

In an inter prediction mode, the inter prediction module 120 may performmotion estimation (ME) and motion compensation (MC). The interprediction module 120 may generate a prediction block based oninformation on at least one of previous and subsequent pictures of thecurrent picture.

The inter prediction module 120 may perform motion estimation based on asplit target prediction block and at least one reference block stored inthe memory 155. The inter prediction module 120 may generate motioninformation including a motion vector (MV), a reference block index anda prediction mode, etc. as a result of motion estimation.

Further, the inter prediction module 120 may perform motion compensationusing the motion information and the reference block. Here, the interprediction module 120 may generate a prediction block from the referenceblock corresponding to an input block and output the predicted block.

In an intra prediction mode, the intra prediction module 125 maygenerate a prediction block based on information on a pixel in thecurrent picture. In the intra prediction mode, the intra predictionmodule 125 may perform prediction for a current block based on a targetprediction block and a reconstructed block previously reconstructedafter transform and quantization. Here, the reconstructed block may be areconstructed picture that has not been subjected to the filter module150.

In the inter prediction mode or intra prediction mode described above,prediction may be performed on a prediction target block to generate aprediction block. Here, a residual block may be generated based on adifferential value between prediction target block (original block) andthe generated prediction block.

The transform module 130 may transform a residual block by a TU togenerate a transform coefficient. A TU may have a tree structure withinmaximum and minimum sizes. It may be indicated through a flag whether acurrent block is split into sub-blocks by each TU. The transform module130 may perform transform based on a discrete cosine transform (DCT)and/or discrete sine transform (DST).

The quantization module 135 may quantize values transformed by thetransform module 130. A quantization coefficient may change based on ablock or priority of a picture. The quantized transform coefficient maybe provided to the rearrangement module 160 and the dequantizationmodule 140.

The rearrangement module 160 may arrange a two-dimensional block of thequantized transform coefficients into a one-dimensional vector oftransform coefficients by scanning so as to enhance efficiency inentropy encoding. The rearrangement module 160 may change a scanningorder based on stochastic statistics to enhance entropy encodingefficiency.

The entropy encoding module 165 may entropy-encode the values obtainedby the rearrangement module 160. In entropy encoding, a codeword withsmaller number of bits may be allocated to a more frequently occurringsyntax element value, while a codeword with more number of bits may beallocated to a less frequently occurring syntax element value. Thus, asize of a bit string for symbols to be encoded may be reduced to enhancevideo encoding compression performance. Various encoding methods, suchas exponential Golomb coding, context-adaptive variable length coding(CAVLC) and/or context-adaptive binary arithmetic coding (CABAC), may beused for entropy encoding. The encoded information may be formed into acompressed bitstream and be transferred or stored through a networkabstraction layer (NAL).

The dequantization module 140 may dequantize the transform coefficientsquantized by the quantization module 135, and the inverse transformmodule 145 may inverse-transform the dequantized transform coefficientsto generate a reconstructed residual block. The reconstructed residualblock may be added to the prediction block generated by the interprediction module 120 or the intra prediction module 125 to generate areconstructed block. The reconstructed block may be provided to theintra prediction module 125 and the filter module 150.

The filter module 150 may perform a deblocking filter, a sample adaptiveoffset (SAO) and/or an adaptive loop filter (ALF) on the reconstructedresidual block. Further, the deblocking filter may perform filtering onthe reconstructed block so as to remove a distortion on boundariesbetween blocks occurring in encoding and decoding. The SAO is a loopfiltering process to be performed on the block, for which the deblockingfiltering process is completed, to reduce the difference from anoriginal picture by a pixel. A band offset and an edge offset may beused as the SAO. The band offset may divide a pixel into 32 bandsaccording to intensity and apply offsets to two divided groups of 16bands on an edge area and 16 bands in a central area. The ALF mayperform filtering so as to minimize an error between the targetprediction block and the finally reconstructed block. The ALF mayperform filtering based on a value obtained by comparing thereconstructed block filtered by the deblocking filter with the currenttarget prediction block, and filter coefficient information on the ALFmay be signaled in a slice header from the encoding apparatus to thedecoding apparatus.

The memory 155 may store the finally reconstructed block via the filtermodule 150, and the finally reconstructed block may be provided to theinter prediction module 120 performing inter prediction.

FIG. 2 is a block diagram illustrating a configuration of a videodecoding apparatus according to an exemplary embodiment of the presentinvention. Referring to FIG. 2, the video decoding apparatus may includean entropy decoding module 210, a rearrangement module 215, adequantization module 220, an inverse transform module 225, an interprediction module 230, an intra prediction module 235, a filter module240 and a memory 245.

The entropy decoding module 210 may obtain a compressed bitstream froman NAL. The entropy decoding module 210 may entropy-decode the obtainedbitstream, and also entropy-decode a prediction mode information andmotion vector information if the bitstream includes the prediction modeinformation and the motion vector information. When entropy decoding isused, a codeword with smaller number of bits may be allocated to a morefrequently occurring syntax element value, while a codeword with morenumber of bits may be allocated to a less frequently occurring syntaxelement value. Thus, a size of a bit string for symbols to be encodedmay be reduced to enhance video decoding performance.

An entropy-decoded transform coefficient or residual signal may beprovided to the rearrangement module 215. The rearrangement module 215may inverse-scan the decoded transform coefficient or residual signal togenerate a 2D block of transform coefficients.

The dequantization module 220 may dequantize the rearranged transformcoefficients. The inverse transform module 225 may inverse-transform thedequantized transform coefficients to generate a residual block.

The residual block may be added to a prediction block generated by theinter prediction module 230 or intra prediction module 235 to generate areconstructed block. The reconstructed block may be provided to theintra prediction module 235 and the filter module 240. The interprediction module 230 and the intra prediction module 235 performsoperations the same as or the equivalent to those of the interprediction module 120 and the intra prediction module 125 of the videoencoding apparatus, and thus descriptions thereof will be omittedherein.

The filter module 240 may perform filtering on the reconstructed blockusing a deblocking filter, an SAO and/or an ALF. The deblocking filtermay perform filtering on the reconstructed blocks to remove a distortionon a boundary between blocks that occurs in encoding and decoding. TheSAO may be applied to the reconstructed block, for which the deblockingfiltering process is completed, to reduce a difference from an originalpicture by a pixel. The ALF may perform filtering on the reconstructedblock for which the SAO is completed, so as to minimize an error betweenthe target prediction block and the finally reconstructed block.

The memory 245 may store the finally reconstructed block obtainedthrough the filter module 240, and the stored reconstructed block may beprovided to the inter prediction module 230 performing inter prediction.

Hereinafter, a block may refer to a video encoding and decoding unit.Thus, in this specification, a block may mean a CU, PU or TU. Also, aencoding/decoding target block may collectively include atransform/inverse transform target block, if transform/inverse transformis performed, and a target prediction block, if prediction is performed.

FIG. 3 schematically illustrates interpolation in inter predictionaccording to an exemplary embodiment of the present invention. As shownin FIG. 3, when the encoding apparatus (and/or decoding apparatus)generates a signal of a PU using motion information on inter prediction,an 8-tap interpolation filter may be used.

Referring to FIG. 3, interpolation is performed for each location in ahorizontal direction or vertical direction to predict a pixel value(including luma and chroma values). As described above, using the 8-tapinterpolation filter means that if a PU is a predetermined 4×4 block(e.g. indicating a current block 310), eight pixel values in the rightdirection and the left direction (i.e. in the horizontal direction) withrespect to the 4×4 block or in the upward direction and downwarddirection (i.e. in the vertical direction) with respect to the 4×4 blockare properly used in interpolation to predict pixel values of thecurrent block 310. Although FIG. 3 illustrates usage of the 8-tap filteronly, the present invention is not limited thereto.

In the present embodiment, 8-tap interpolation may be performed in thehorizontal direction and then 8-tap interpolation may be performed inthe vertical direction. First, assuming that a pixel value of a top leftpixel of each 4×4 block is known, a pixel value of a pixel (a_(0,0))just to the right of the top left pixel may be predicted byinterpolation using pixel values of top left pixels of three 4×4 blockson the left of the current block and pixel values of top left pixels offour 4×4 blocks on the right of the current block, which is expressed bythe following equation.

a _(0,0)=(−A _(−3,0)+4*A _(−2,0)−10*A _(−1,0)+57*A _(0,0)+19*A_(1,0)−7*A _(2,0)+3*A _(3,0) −A _(4,0))>>shift1  [Equation 1]

Here, shift1=BitDepthY (Bit depth of Y component)−8. In this way, pixelvalues of other pixels in the current block 310 may be predicted byinterpolation, which is expressed by the following equation.

b _(0,0)=(−A _(−3,0)+4*A _(−2,0)−11*A _(−1,0)+40*A _(0,0)+40*A_(1,0)−11*A _(2,0)+4*A _(3,0) −A _(4,0))>>shift1

c _(0,0)=(−A _(−3,0)+3*A _(−2,0)−7*A _(−1,0)+19*A _(0,0)+57*A_(1,0)−10*A _(2,0)+4*A _(3,0) −A _(4,0))>>shift1

d _(0,0)=(−A _(0,−3)+4*A _(0,−2)−10*A _(0,−1)+57*A _(0,0)+19*A_(0,1)−7*A _(0,2)+3*A _(0,3) −A _(0,4))>>shift1

h _(0,0)=(−A _(0,−3)+4*A _(0,−2)−11*A _(0,−1)+40*A _(0,0)+40*A_(0,1)−11*A _(0,2)+4*A _(0,3) −A _(0,4))>>shift1

n _(0,0)=(−A _(0,−3)+6*A _(0,−2)−7*A _(0,−1)+19*A _(0,0)+57*A_(0,1)−10*A _(0,2)+4*A _(0,3) −A _(0,4))>>shift1

e _(0,0)=(−a _(0,−3)+4*a _(0,−2)−10*a _(0,−1)+57*a _(0,0)+19*a_(0,1)−7*a _(0,2)+3*a _(0,3) −a _(0,4))>>shift2

f _(0,0)=(−a _(0,−3)+4*a _(0,−2)−11*a _(0,−1)+40*a _(0,0)+40*a_(0,1)−11*a _(0,2)+4*a _(0,3) −a _(0,4))>>shift2

g _(0,0)=(−a _(0,−3)+3*a _(0,−2)−7*a _(0,−1)+19*a _(0,0)+57*a_(0,1)−10*a _(0,2)+4*a _(0,3) −a _(0,4))>>shift2

i _(0,0)=(−b _(0,−3)+4*b _(0,−2)−10*b _(0,−1)+57*b _(0,0)+19*b_(0,1)−7*b _(0,2)+3*b _(0,3) −b _(0,4))>>shift2

j _(0,0)=(−b _(0,−3)+4*b _(0,−2)−11*b _(0,−1)+40*b _(0,0)+40*b_(0,1)−11*b _(0,2)+4*b _(0,3) −b _(0,4))>>shift2

k _(0,0)=(−b _(0,−3)+3*b _(0,−2)−7*b _(0,−1)+19*b _(0,0)+57*b_(0,1)−10*b _(0,2)+4*b _(0,3) −b _(0,4))>>shift2

p _(0,0)=(−c _(0,−3)+4*c _(0,−2)−10*c _(0,−1)+57*c _(0,0)+19*c_(0,1)−7*c _(0,2)+3*c _(0,3) −c _(0,4))>>shift2

q _(0,0)=(−c _(0,−3)+4*c _(0,−2)−11*c _(0,−1)+40*c _(0,0)+40*c_(0,1)−11*c _(0,2)+4*c _(0,3) −c _(0,4))>>shift2

r _(0,0)=(−c _(0,−3)+3*c _(0,−2)−7*c _(0,−1)+19*c _(0,0)+57*c_(0,1)−10*c _(0,2)+4*c _(0,3) −c _(0,4))>>shift2   [Equation 2]

Here, shift2=8. As shown in Equation 2, pixel values of three upperpixels and three left pixels other than the top left pixel of thecurrent block 310 may be predicted by horizontal or verticalinterpolation using pixel values of top left pixels of vertically orhorizontally neighboring 4×4 blocks, and pixel values of remainingpixels may be predicted by vertical or horizontal interpolation usingpixels values of upper pixels of seven 4×4 blocks vertically orhorizontally neighboring. Using Equation 1 or 2, pixel values of a PU tobe currently predicted may be derived and a prediction signal related tothe PU may be generated.

FIG. 4 schematically illustrates that an interpolation filter tap isused when asymmetric motion partitioning (AMP) is used as asymmetric inthe vertical direction in the video encoding apparatus according to anexemplary embodiment of the present invention.

Referring to FIG. 4, when a PU is partitioned as AMP and a long filtertap, such as an 8-tap, is used for a shorter direction of anasymmetrical partition, pixels of a different partition are alsoinvolved in the interpolation. In this case, pixels have a weakcorrelation when belonging to different partitions, and thusinterpolation efficiency is likely to decrease. That is, when the block412 and the block 414 are interpolated together, interpolationefficiency decreases due to a weak correlation between the block 412 andthe block 414. The same result is brought to the block 422 and the block424.

According to the present embodiment, when a PU is partitioned as AMP, asmaller filter tap than a conventional filter tap may be used forinterpolation in an asymmetric direction of an asymmetricallypartitioned PU with a shorter length. For example, a smaller filter tapthan an 8-tap may be used to perform interpolation of the asymmetricallypartitioned PU with the shorter length. In an inter mode, a PU may havea 2N*2N, 2N*N, N*2N, N*N, 2N×nU, 2N×nD, nL×2N or nR×2N form. An 8-tapfilter may be used for interpolation of a symmetrically partitioned PU,such as 2N*2N, 2N*N, N*2N and N*N PUs.

Referring to left illustration of FIG. 4, when the PU is partitioned asa shape of 2N×nU block 410, which is asymmetrically partitioned in thevertical direction, an upper block 412 is a partitioned block with ashorter length. The block 410 may include the upper block 412 and alower block 414, in which a ratio between lengths in the verticaldirection of the upper block 412 and the lower block 414 may be 16:48.Referring to a right illustration of FIG. 4, when the PU is partitionedas a shape of a 2N×nD block 420, which is asymmetrically partitioned inthe vertical direction, a lower block 424 is a partitioned block with ashorter length. The block 420 may include an upper block 422 and thelower block 424, in which a ratio between lengths in the verticaldirection of the upper block 422 and the lower block 424 may be 48:16.When asymmetrically partitioned in the vertical direction, the upperblock 412 of the 2N×nU block 410 and the lower block 424 of the 2N×nDblock 420 may be interpolated using a smaller tap in the verticaldirection than in the horizontal direction. For example, when an 8-tapfilter is used in the horizontal direction, a filter with a smaller tapthan an 8-tap may be used in the vertical direction.

FIG. 5 schematically illustrates that an interpolation filter tap isused when AMP is used as asymmetric in the horizontal direction in thevideo encoding apparatus according to an exemplary embodiment of thepresent invention.

Referring to a left illustration of FIG. 5, when the PU is partitionedas a shape of an nL×2N block 510, which is asymmetrically partitioned inthe horizontal direction, a left block 512 is a partitioned block with ashorter length. The block 510 may include the left block 512 and a rightblock 514, in which lengths in the vertical direction of the left block512 and the right block 514 may be the same that is 64 while a ratiobetween lengths thereof in the horizontal direction may be 16:48.Referring to a right illustration of FIG. 5, when the PU is partitionedas a shape of a nR×2N block 520, which is asymmetrically partitioned inthe horizontally direction, a right block 524 is a partitioned blockwith a shorter length. The block 520 may include a left block 522 andthe right block 524, in which a ratio between lengths in the horizontaldirection of the left block 522 and the right block 524 may be 48:16.When asymmetrically partitioned in the horizontal direction, the leftblock 512 of the nL×2N block 510 and the right block 524 of the nR×2Nblock 520 may be interpolated using a smaller tap in the horizontaldirection than in the vertical direction. For example, a filter with asmaller tap than an 8-tap may be used in the horizontal direction.

Although exemplary embodiments of FIGS. 4 and 5 have been described withreference to a 64×64 block, the exemplary embodiments also can beapplied for blocks with various sizes or shapes other than a 64×64block.

FIG. 6 is a flowchart schematically illustrating a process of performinginter prediction for an asymmetrically partitioned PU in the videoencoding apparatus according to an exemplary embodiment of the presentinvention. As shown in FIG. 6, the process of performing interprediction may include obtaining partition information (S610),determining a length in an asymmetric direction (S620), determining alength of a filter tap (S630) and performing interpolation (S640).

Referring to FIG. 6, in obtaining the partition information (S610),partition information on an asymmetrically partitioned block isobtained. In the encoding process, the partition information may beincluded in motion information on a current PU through motionestimation. The motion information may include information on a motionvector of the PU, a reference picture index, a prediction directionindex, a prediction mode and a information on the shape of the PU.

According to the present embodiment, since a bitstream may be generatedincluding information on a length of an interpolation filter tap of thePU corresponding to an encoding target block in the encoding process,the decoding apparatus may obtain information on the length of theinterpolation filter tap of the PU corresponding to a decoding targetblock from the received bitstream. In this case, determining the length(S620) and determining the length of the filter tap (S630) may beomitted. When the bitstream does not include the information on thelength of the filter tap, the information on the shape of the PU may beobtained, followed by determining the length (S620) and determining thelength of the filter tap (S630), thereby determining the length of thefilter tap.

In determining the length in the asymmetric direction (S620), theencoding apparatus (and/or decoding apparatus) determines a length inthe asymmetric direction (either in the vertical direction or in thehorizontal direction) of the PU corresponding to the encoding (and/ordecoding) target block based on the obtained partition information. Thatis, the encoding apparatus determines whether an asymmetricallypartitioned block in the horizontal direction has a longer length orshorter length.

Then, in determining the length of the filter tap (S630), the length ofthe filter tap for interpolation of the PU corresponding to the encoding(or decoding) target block is determined based on a result ofdetermining the length. As described above, the length of the filter tapis determined based on a partitioned length in the asymmetric direction.For instance, the length of the filter tap may be determined such thattap with a shorter length in the vertical direction than in thehorizontal direction is applied to an asymmetrically partitioned blockhaving a shorter length in the vertical direction while tap with ashorter length in the horizontal direction than in the verticaldirection is applied to an asymmetrically partitioned block having ashorter length in the horizontal direction.

In performing interpolation (S640), the encoding apparatus (and/ordecoding apparatus) performs interpolation based on the length of thefilter tap determined in determining the length of the filter (S630).

According to the present embodiment, in the encoding process,interpolation is performed based on the determined length of the filtertap, and a bitstream is generated including the information on thelength of the filter tap.

FIG. 7 schematically illustrates that an interpolation filter tapadequate for a vertical or horizontal length of a partitioned PU is usedwhen AMP is used in the vertical direction in the video encodingapparatus according to an exemplary embodiment of the present invention.

Referring to FIG. 7, interpolation may be performed for anasymmetrically partitioned block with a larger area using a filter witha longer tap than for an asymmetrically partitioned block with a smallerarea. Further, a total length of filter taps in the asymmetricaldirection of at least two partitioned blocks may be greater than alength of a filter tap in a direction other than the asymmetricdirection.

Referring to a left illustration of FIG. 7, a 2N×nU block isasymmetrically partitioned in the vertical direction, wherein an upperblock 710 is a partitioned block with a shorter length. The upper block710 of the 2N×nU block has a shorter length in the vertical directionthan a lower block 720, in which a ratio between lengths of the upperblock 710 and the lower block 720 may be 16:48. In this case, alonger-tap filter may be used for the lower block 720 with a larger areathan for the upper block 710 with a smaller area. Further, a totallength of filter taps in the asymmetric direction, that is, a totallength of a vertical filter tap of the upper block 710 and a verticalfilter tap of the lower block 720, may be larger than a length of ahorizontal filter tap for the upper block 710 and the lower block 720.

For example, a 4-tap filter may be used for the upper block 710 ininterpolation for the vertical direction, while a 6-tap filter may beused for the lower block 720 in interpolation for the verticaldirection. That is, a total tap length of the 4-tap filter and the 6-tapfilter is 10, which is larger than a horizontal filter tap length of 8.

Referring to a right illustration of FIG. 7, the same manner may beapplied to a 2N×nD block, in which case a 6-tap filter may be used foran upper block 730 in interpolation for the vertical direction, while a4-tap filter may be used for a lower block 740 in interpolation for thevertical direction.

FIG. 8 schematically illustrates that an interpolation filter tapadequate for a vertical or horizontal length of a partitioned PU is usedwhen AMP is used in the horizontal direction in the video encodingapparatus according to an exemplary embodiment of the present invention.

Referring to a left illustration of FIG. 8, an nL×2N block isasymmetrically partitioned in the horizontal direction, wherein a leftblock 810 is a partitioned block with a shorter length. The left block810 of the nL×2N block has a shorter length in the horizontal directionthan a right block 820, in which a ratio between lengths of the leftblock 810 and the right block 820 may be 16:48. In this case, alonger-tap filter may be used for the right block 820 with a larger areathan for the left block 810 with a smaller area. Further, a total lengthof filter taps in the asymmetric direction, that is, a total length of ahorizontal filter tap of the left block 810 and a horizontal filter tapof the right block 820, may be larger than a length of a vertical filtertap for the left block 810 and the right block 820.

For example, a 4-tap filter may be used for the left block 810 ininterpolation for the horizontal direction, while a 6-tap filter may beused for the right block 820 in interpolation for the horizontaldirection.

Referring to a right illustration of FIG. 8, the same manner may beapplied to an nR×2N block, in which case a 6-tap filter may be used fora left block 830 in interpolation for the horizontal direction, while a4-tap filter may be used for a right block 840 in interpolation for thehorizontal direction.

Table 1 illustrates vertical and horizontal interpolation filter tapnumbers of asymmetrical blocks.

TABLE 1 Vertical filter tap Horizontal filter tap 2N × nU (upper block)4 8 2N × nU (lower block) 6 8 2N × nD (upper block) 6 8 2N × nD (lowerblock) 4 8 nL × 2N (left block) 4 8 nL × 2N (right block) 6 8 nR × 2N(left block) 6 8 nR × 2N (right block) 4 8

FIG. 9 is a flowchart schematically illustrating a video encoding methodaccording to an exemplary embodiment of the present invention.

Referring to FIG. 9, the encoding apparatus may derive a predictedmotion value of a current inter PU (S910). Motion information on thecurrent PU is not transmitted as it is but differential value frompredicated value obtained from temporally and spatially neighboringblocks are transmitted so as to enhance compression efficiency. Theencoding apparatus may derive a merge candidate list and an advancedmotion vector prediction (AMVP) candidate list for the current inter PUso as to derive the predicted motion value.

The encoding apparatus may generate a PU using the motion information(S920). Specifically, interpolation may be performed using a short-tapfilter for an asymmetrically partitioned PU in a direction of a shorterpartitioned length. Interpolation methods for the asymmetricallypartitioned PU have been described above, and thus descriptions thereofare omitted herein.

The encoding apparatus may encode the motion information on the currentblock (S930). In a merge mode, if a candidate having the same motioninformation as the current PU is present among merge candidates, theencoding apparatus indicates that the current PU is in the merge modeand transmits a flag indicating that the merge mode is used and an indexindicating which candidate is used among the merging candidates. In anAMVP mode, the encoding apparatus determines a candidate minimizing acost function among AMVP candidates by comparing motion vectorinformation between the AMVP candidates and the current PU, and performsmotion compensation using the determined candidate and a differentialvalue in motion information between the current PU and the AMVPcandidate to obtain a residual signal.

The encoding apparatus may generate a residual block corresponding tothe current block (S940). As described above, the encoding apparatus mayperform inter prediction and/or intra prediction for the current block,thereby generating a prediction block corresponding to the currentblock. Here, the encoding apparatus may generate a residual signal, thatis, the residual block, by obtaining a difference by pixels between apixel value of the current block and a pixel value of the predictionblock.

In FIG. 9, the encoding apparatus may transform the residual signal,that is, the residual block (S950). The encoding apparatus may performtranscoding on the residual signal by using a transform kernel, and thetransform kernel may have a 2×2, 4×4, 8×8, 16×16, 32×32 or 64×64 size.In one exemplary embodiment, a transform coefficient C for an n×n blockmay be calculated as follows.

C(n,n)=T(n,n)×B(n,n)×T(n,n)^(T)   [Equation 3]

Here, C(n,n) is an n×n transform coefficient matrix, T(n,n) is an n×ntransform kernel matrix, and B(n,n) is an n×n matrix of a residualblock.

When a transform coefficient is generated via transformation, theencoding apparatus may quantize the generated transform coefficient.

The encoding apparatus may determine based on RDO which to transmitamong the residual block and the transform coefficient. When predictionis properly done, the residual block, that is, the residual signal, maybe transmitted as it is, without transcoding. The encoding apparatus maycompare cost functions before/after transcoding and select a methodinvolving minimum cost. Here, the encoding apparatus may transmitinformation on a type of a signal (residual signal or transformcoefficient) to be transmitted with respect to the current block to thedecoding apparatus.

In FIG. 9, the encoding apparatus may scan the transform coefficient(S960).

When scanning is done, the encoding apparatus may entropy-encode thescanned transform coefficient and side information (for example,information on an inter prediction mode of the current block) (S970).The encoded information may be formed into a compressed bitstream and bestored in a medium or transmitted through an NAL.

Although the encoding method is described with a series of stages basedon the flowchart in FIG. 9, the present invention is not limitedthereto. Some stages of FIG. 9 may be carried out in different orderfrom described above or in parallel. Further, additional stages may beincluded between stages in the flowchart, or one or more stages may bedeleted from the flowchart of FIG. 9 within the scope of the presentinvention.

FIG. 10 is a flowchart schematically illustrating a video decodingmethod according to an exemplary embodiment of the present invention.

Referring to FIG. 10, the decoding apparatus may entropy-decode abitstream received from the encoding apparatus (S1010). For instance,the decoding apparatus may derive a prediction mode and a residualsignal of a current block based on a variable length coding (VLC) tableand/or CABAC. The decoding apparatus may obtain information on whether asignal received with respect to the current block is the residual signalor a transform coefficient. And the decoding apparatus may obtain theresidual signal or a 1D vector of transform coefficients for the currentblock. When the received bitstream includes side information needed fordecoding, both the bitstream and the side information may beentropy-decoded.

In FIG. 10, the decoding apparatus may inverse-scan the entropy-decodedresidual signal or transform coefficients to generate a two-dimensionalblock (S1020). Here, a residual block may be generated in the case ofthe residual signal, and a two-dimensional block of transformcoefficients may be generated in the case of the transform coefficients.When the transform coefficients are generated by entropy-decoding, thedecoding apparatus may dequantize the generated transform coefficients(S1030).

The decoding apparatus may inverse-transform the dequantized transformcoefficients, thereby generating a residual block (S1040). Inversetransformation may be represented by Equation 4.

B(n,n)=T(n,n)×C(n,n)×T(n,n)^(T)   [Equation 4]

When the residual block is generated, the decoding apparatus may performinter prediction based on the residual block (S1050). The decodingapparatus performs inter prediction using one of the merge mode and theAMVP mode to obtain motion information.

The decoding apparatus may generate a PU using the obtained motioninformation. Interpolation may be performed using a short-tap filter foran asymmetrically partitioned PU in a direction of a shorter partitionedlength. Interpolation methods for the asymmetrically partitioned PU havebeen described above, and thus descriptions thereof are omitted herein.

The decoding apparatus may add signal of the residual block and a signalobtained using previous frame to generate a reconstructed block, therebyreconstructing a picture (S1070). As described above, the decodingapparatus may perform inter prediction and may perform intra predictionalso for a decoding target block to generate a prediction blockcorresponding to the decoding target block. Here, the decoding apparatusmay add a pixel value of the prediction block and a pixel value of theresidual block by a pixel, thereby generating the reconstructed block.

Although the decoding method is described with a series of stages basedon the flowchart in FIG. 10, the present invention is not limitedthereto. Some stages of FIG. 10 may be carried out in different orderfrom described above or in parallel. Further, additional stages may beincluded between stages in the flowchart, or one or more stages may bedeleted from the flowchart of FIG. 10 within the scope of the presentinvention.

While methods have been described with a series of stages or blocksbased on the flowcharts in the aforementioned embodiments, the presentinvention is not limited to the foregoing sequence of the stages. Somestages may be carried out in different order from described above or atthe same time. Also, it will be understood by those skilled in the artthat the stages illustrated in the flowcharts are not exclusive,additional stages may be included in the flowchart, or one or morestages may be deleted from the flowcharts without affecting the scope ofthe present invention.

The present invention has been described with reference to the exemplaryembodiments, and the foregoing embodiments include various aspects ofexamples. Although all possible combinations may not be mentioned toillustrate various aspects, it will be appreciated by those skilled inthe art that changes, modifications and alternatives may be made inthese exemplary embodiments without departing from the principles andspirit of be the invention, the scope of which is defined in theappended claims and their equivalents.

1-20. (canceled)
 21. A method of decoding a video signal having aprediction block to be decoded with a decoding apparatus, comprising:selecting a reference picture of the prediction block using a referenceindex of the prediction block; determining a reference block in thereference picture using a motion vector of the prediction block;interpolating the reference block by applying a first tap filterrelating to a horizontal direction and a second tap filter relating to avertical direction to the reference block; and obtaining predictionsamples of the prediction block using the interpolated reference block;and decoding the prediction block by using the prediction samples,wherein a number of filter coefficients having non-zero real-number ofthe first tap filter is different from a number of filter coefficientshaving non-zero real-number of the second tap filter.
 22. The method ofclaim 21, the method further comprising: generating a merge candidatelist of the prediction block, the merge candidate list includingmultiple merge candidates; and obtaining the reference index and themotion vector of the prediction block by using a merge candidate amongthe multiple merge candidates that corresponds to a merge index of theprediction block.
 23. The method of claim 22, wherein the multiple mergecandidates include a spatial neighboring block of the prediction blockand a temporal neighboring block of the prediction block.
 24. The methodof claim 21, wherein the number of the filter coefficients havingnon-zero real-number of the second tap filter is smaller than the numberof the filter coefficients having non-zero real-number of the first tapfilter.